Move instantiation of firestore to prevent race-problems.#279
Move instantiation of firestore to prevent race-problems.#279Scarygami wants to merge 2 commits intoFirebaseExtended:firestorefrom
Conversation
|
Could this issue maybe get fixed? I recently ran into the same error @Scarygami described and the fix seems to be working. |
|
I've rebased this PR against the current firestore branch. (Also gets rids of the "The behavior for Date objects stored in Firestore is going to change Also moved the super.connectedCallback back to the end. This move only solved issues in the original version of this mixin, which has significantly changed since then. |
|
I tried out your updated polymerfire firestore branch and for some reason I am still getting the no-app error, even though I have the firebase-app element imported and included in the element. |
I've run into an issue when using FirestoreElement in the same element that has
firebase-app.Accessing
firebase.firestore()in the constructor happened beforefirebase-apphad a chance to initialize the app, resulting in an error.A workaround would have been to create a separate element with the FirestoreElement mixin to load the data and retrieve the data from there instead of using a Firestore property directly, but the error was easy enough to fix this way.